$mainColor: #3976F9;
$transitionTime: 0.5s;

* {
    outline: none;
}

a {
    color: black;
    text-decoration: none;
}

html,
body,
.main {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.main {
    display: flex;
    align-items: center;
    justify-content: center;
}

// 表单盒子样式
.form-box {
    display: flex;
    position: relative;
    width: 800px;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 0px 4px rgba($color: #000000, $alpha: 0.5);

    // 背景
    .background {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 50%;
        height: 100%;
        background-color: $mainColor;
        color: white;
        transform: translateX(0%);
        transition: all $transitionTime ease-in-out;
        z-index: 3;

        :nth-child(n) {
            margin: 16px 0px;
        }

        p {
            color: rgba($color: #fff, $alpha: 0.8);
        }

        // 按钮
        a {
            text-align: center;
            line-height: 32px;
            width: 100px;
            height: 32px;
            border: 1px solid white;
            background-color: white;
            border-radius: 4px;
            color: $mainColor;
            transition: opacity $transitionTime;
            cursor: pointer;

            &:hover {
                opacity: 0.8;
            }
        }

        // 文本
        .login-text {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            width: 100%;
        }
    }
}

// 重置密码盒子样式
.forget-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 50%;
    height: 100%;
    padding-top: 50px;
    background-color: white;
    transform: translateX(100%);
    transition: all $transitionTime;

    // 重置密码标题样式
    .forget-title {
        font-weight: 100;
        font-size: 20px;
        color: black;
        letter-spacing: 1rem;
        margin-right: -1rem;
        margin-bottom: 32px;
    }

    // 重置密码表单样式
    .forget-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;

        :nth-child(n) {
            margin-bottom: 24px;
        }

        // 输入框样式
        input {
            width: calc(100% - 150px);
            height: 46px;
            padding: 0px 10px;
            padding-left: 48px;
            font-size: 20px;
            border: none;
            border-bottom: 1px solid gainsboro;
            transition: border $transitionTime;

            &:focus {
                border-bottom: 1px solid $mainColor;
            }
        }

        // 用户名输入框样式
        .forget-username {
            background: white url("../images/user.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 密码输入框样式
        .forget-password {
            background: white url("../images/password.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 手机输入框样式
        .forget-phone {
            background: white url("../images/phone.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 获取验证码块样式
        .forget-code-pane {
            display: flex;
            position: relative;
            width: calc(100% - 92px);

            // 验证码输入框样式
            .forget-code {
                width: 100%;
                padding-right: 120px;
                background: white url("../images/message.png") no-repeat;
                background-size: 32px;
                background-position: 8px center;
            }

            // 验证码按钮样式
            .forget-code-button {
                display: block;
                position: absolute;
                right: 0px;
                width: 120px;
                height: 40px;
                padding: 0;
                background-color: transparent;
                border: none;
                cursor: pointer;
                transition: color $transitionTime;

                &:hover {
                    color: $mainColor;
                }

                &:disabled {
                    color: rgb(200, 200, 200);
                    cursor: not-allowed;
                }
            }
        }

        // 重置密码按钮样式
        .reset-button {
            padding: 0;
            width: 120px;
            height: 40px;
            color: white;
            background-color: $mainColor;
            border: 1px solid $mainColor;
            border-radius: 4px;
            transition: opacity $transitionTime;
            cursor: pointer;

            &:hover {
                opacity: 0.8;
            }
        }

        // 链接样式
        a {
            transition: color $transitionTime;

            &:hover {
                color: $mainColor;
            }
        }
    }
}